<!DOCTYPE html>
<html>

<head>

  <script src="https://unpkg.com/compromise"></script>
  <!-- <script src="https://unpkg.com/compromise-stats"></script> -->
  <script src="../builds/compromise-stats.min.js"></script>

</head>

<body>
  <p>compromise-stats demo:</p>
  <ul>
    <kbd>Who keeps the metric system down? We do, we do! </kbd>
    <pre id="res">loading</pre>
  </ul>

  <script defer>
    nlp.plugin(compromiseStats) // window.compromiseDates
    let txt = document.querySelector('kbd').innerText
    let doc = nlp(txt)
    let json = doc.ngrams()
    document.querySelector('#res').innerHTML = JSON.stringify(json, null, 2)
  </script>
</body>

</html>